home *** CD-ROM | disk | FTP | other *** search
/ PC Open 107 / PC Open 107 CD 1.bin / CD1 / INTERNET / Abilon / InstallAB.exe / Style / Clean and Simple.xsl next >
Encoding:
Extensible Markup Language  |  2004-07-09  |  2.5 KB  |  62 lines

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="xml" omit-xml-declaration="yes"/>
  4. <xsl:variable name="common-styles">
  5. <style type="text/css">
  6. body        { font-family:Verdana;Arial; font-size:11pt; margin:0pt; padding:0pt; }
  7. table.header {font-family:Verdana;Arial;color:#000000;cell-padding:2pt;background:#FFFFFF;width:100%;height:30px;border-bottom: 1px dotted #888888;}
  8. div.footer {color: gray; font-size: xx-small; text-align: right; margin-top: 2px;}
  9. .title        {font-size:9pt;    font-weight: normal;}
  10. .date        { font-size:9pt; }
  11. div.content { font-family:Verdana, Arial;font-size:10pt;margin:10pt;padding:5pt;  }
  12. td.title a:link      { color:#0000CC;text-decoration:none;font-weight:normal; }
  13. td.title a:visited   { color:#0000CC;text-decoration:none; }
  14. td.title a:hover         { color:#0000FF;text-decoration:underline;font-weight:normal; }
  15. a:link      {color:#0000CC;text-decoration:none;font-weight:normal; }
  16. a:visited   {color:#0000CC;text-decoration:none;}
  17. a:hover        { color:#0000FF;text-decoration:underline;font-weight:normal; }
  18.         </style>
  19.  </xsl:variable>
  20.  
  21.  
  22. <xsl:template match="//record">
  23.     <html>
  24.     <head>
  25.         <title>News Item</title>
  26.         <xsl:copy-of select="$common-styles"/>
  27.     </head>
  28.     <body>
  29.     <table class="header">
  30.       <tr>
  31.          <td class="title" width="20px" align="left" valign="top"><strong>From: </strong></td>
  32.          <td><xsl:value-of select="feed/title" disable-output-escaping="yes"/></td>
  33.       </tr>       
  34.       <tr>
  35.          <td class="title" width="20px" valign="top" align="left"><strong>Subject: </strong></td>
  36.          <td><a href="{item/link}"><xsl:value-of select="item/title" disable-output-escaping="yes"/></a></td>
  37.       </tr>
  38.       <tr>
  39.          <td class="title" width="20px" valign="top" align="left"><strong>Date: </strong></td>
  40.          <td class="date"><xsl:value-of select="item/published" disable-output-escaping="yes"/></td>
  41.       </tr>
  42.     </table>
  43.  
  44.     <div class="content">
  45.         <xsl:value-of select="item/content" disable-output-escaping="yes"/>
  46.     <br/><a href="{item/link}">Read on...</a></div>
  47.         <div class="footer">
  48.         <xsl:if test="item/comments">
  49.             <xsl:variable name="commentlink" select="item/comments/@link"/>
  50.             <a href="{$commentlink}"><xsl:value-of select="item/comments/@text"/></a>
  51.         </xsl:if>            
  52.         <xsl:if test="item/reply">
  53.             <xsl:variable name="replylink" select="item/reply/@link"/>
  54.             <xsl:text> </xsl:text><a href="{$replylink}"><xsl:value-of select="item/reply/@text"/></a>
  55.         </xsl:if>            
  56.         </div>    
  57.  
  58.     </body>
  59.     </html>
  60. </xsl:template>
  61.  
  62. </xsl:stylesheet>